/**
  ******************************************************************************
  * @file    PCFG_CALIB.h 
  * @author  Feirui_Joe
  * @version V0.1
  * @date    07/26/2010
  * @brief   HGM63 all configurations on PC
  ******************************************************************************
  * @copy
  *
  * <h2><center>&copy; COPYRIGHT 2010 Feirui</center></h2>
  */ 

#ifndef  __PCFG_CALIB_H__
#define  __PCFG_CALIB_H__

#ifdef __cplusplus
 extern "C" {
#endif

/**
  * @brief  INCLUDE FILES.
  */


/**
  * @brief GLOBALS RAM definition
  */
#ifdef   PCFG_CALIB_GLOBALS
#define  PCFG_CALIB_EXT
#else
#define  PCFG_CALIB_EXT  extern
#endif


/*************************************************************/
/*
   Page96   	Event Record
   200	      Calibration Configuration Registers            
 */
/*************************************************************/


                                               /****************************/
                                               /* Page114 Config Description */
                                               /****************************/

#define CfgCalibParamsGainTimes                10000

/*-------------------------------------------------*/
/*----------------CalibrationConfigRegisters--------------------*/
/*-------------------------------------------------*/

/*************Cfg Page Manage Define************/
#define CfgPage114ManageDefault           {\
	CfgPermiOpt_Common                      ,\
	CfgOperaPermi_ReadWrite                 ,\
	CfgPermiOpt_Common                      ,\
	CfgFunPermi_Engineer                    ,\
	CfgOperaType_OSSem                      ,\
	AppSemOrd_PCFGPAGE114                   ,\
	CfgDataStru_NoLimit                     ,\
	(uint32_t)LXCfgBuffer_CalibrationConfigRegisters,\
	CfgBFSize_CalibrationConfigRegisters            ,\
}
PCFG_CALIB_EXT const CfgPageManage_TypeDef CfgPage114ManageUnit;

/*******************Cfg Buffer Define**************/
#define CfgBFSize_PCFGPAGE114                      CfgBFSize_CalibrationConfigRegisters
#define CfgBFSize_CalibrationConfigRegisters       32 
PCFG_CALIB_EXT uint16_t LXCfgBuffer_CalibrationConfigRegisters[CfgBFSize_CalibrationConfigRegisters];

#define CfgRangeVal_CalibMaxValue                 59999
#define CfgRangeVal_CalibMinValue                  1000

/* Default */
#define CfgDefaultVal_CalibOilPress               ((uint16_t)10000)
#define CfgDefaultVal_CalibTemp                   ((uint16_t)10000)
#define CfgDefaultVal_CalibFuel                   ((uint16_t)10000)
#define CfgDefaultVal_CalibSensor1                ((uint16_t)10000)
#define CfgDefaultVal_CalibSensor2                ((uint16_t)10000)
#define CfgDefaultVal_CalibGenVoltL1              ((uint16_t)10000)
#define CfgDefaultVal_CalibGenVoltL2              ((uint16_t)10000)
#define CfgDefaultVal_CalibGenVoltL3              ((uint16_t)10000)
#define CfgDefaultVal_CalibGenVoltL12             ((uint16_t)10000)
#define CfgDefaultVal_CalibGenVoltL23             ((uint16_t)10000)
#define CfgDefaultVal_CalibGenVoltL31             ((uint16_t)10000)
#define CfgDefaultVal_CalibGenCurrL1              ((uint16_t)10000)
#define CfgDefaultVal_CalibGenCurrL2              ((uint16_t)10000)
#define CfgDefaultVal_CalibGenCurrL3              ((uint16_t)10000)
#define CfgDefaultVal_CalibGenKWL1                ((uint16_t)10000)
#define CfgDefaultVal_CalibGenKWL2                ((uint16_t)10000)
#define CfgDefaultVal_CalibGenKWL3                ((uint16_t)10000)
#define CfgDefaultVal_CalibGenBatt                ((uint16_t)10000)
#define CfgDefaultVal_CalibGenCharge              ((uint16_t)10000)
#define CfgDefaultVal_CalibMainVoltL1             ((uint16_t)10000)
#define CfgDefaultVal_CalibMainVoltL2             ((uint16_t)10000)
#define CfgDefaultVal_CalibMainVoltL3             ((uint16_t)10000)
#define CfgDefaultVal_CalibMainVoltL12            ((uint16_t)10000)
#define CfgDefaultVal_CalibMainVoltL23            ((uint16_t)10000)
#define CfgDefaultVal_CalibMainVoltL31            ((uint16_t)10000)
#define CfgDefaultVal_CalibBattery1               ((uint16_t)10000)
#define CfgDefaultVal_CalibBattery2               ((uint16_t)10000)
#define CfgDefaultVal_CalibModuleTemp             ((uint16_t)10000)
#define CfgDefaultVal_CalibExciteVolt             ((uint16_t)10000)
#define CfgDefaultVal_CalibActuatorVolt           ((uint16_t)10000)
#define CfgDefaultVal_Reserved1                   ((uint16_t)10000)
#define CfgDefaultVal_Reserved2                   ((uint16_t)10000)
#define LXCfgDefaultVal_CalibrationConfig   {\
  CfgDefaultVal_CalibOilPress            ,\
  CfgDefaultVal_CalibTemp                ,\
  CfgDefaultVal_CalibFuel                ,\
  CfgDefaultVal_CalibSensor1             ,\
  CfgDefaultVal_CalibSensor2             ,\
  CfgDefaultVal_CalibGenVoltL1           ,\
  CfgDefaultVal_CalibGenVoltL2           ,\
  CfgDefaultVal_CalibGenVoltL3           ,\
  CfgDefaultVal_CalibGenVoltL12          ,\
  CfgDefaultVal_CalibGenVoltL23          ,\
  CfgDefaultVal_CalibGenVoltL31          ,\
  CfgDefaultVal_CalibGenCurrL1           ,\
  CfgDefaultVal_CalibGenCurrL2           ,\
  CfgDefaultVal_CalibGenCurrL3           ,\
  CfgDefaultVal_CalibGenKWL1             ,\
  CfgDefaultVal_CalibGenKWL2             ,\
  CfgDefaultVal_CalibGenKWL3             ,\
  CfgDefaultVal_CalibGenBatt             ,\
  CfgDefaultVal_CalibGenCharge           ,\
  CfgDefaultVal_CalibMainVoltL1          ,\
  CfgDefaultVal_CalibMainVoltL2          ,\
  CfgDefaultVal_CalibMainVoltL3          ,\
  CfgDefaultVal_CalibMainVoltL12         ,\
  CfgDefaultVal_CalibMainVoltL23         ,\
  CfgDefaultVal_CalibMainVoltL31         ,\
  CfgDefaultVal_CalibBattery1            ,\
  CfgDefaultVal_CalibBattery2            ,\
  CfgDefaultVal_CalibModuleTemp          ,\
  CfgDefaultVal_CalibExciteVolt          ,\
  CfgDefaultVal_CalibActuatorVolt        ,\
  CfgDefaultVal_Reserved1                ,\
  CfgDefaultVal_Reserved2                ,\
}
PCFG_CALIB_EXT const uint16_t LXCfgDefault_CalibrationConfig[CfgBFSize_CalibrationConfigRegisters];
#define EEPROMDefaultAdr_pcfgPage114 LXCfgDefault_CalibrationConfig

                                               /****************************/
                                               /* Page96 Config Description */
                                               /****************************/

/*-------------------------------------------------*/
/*----------------EventRecordP0--------------------*/
/*-------------------------------------------------*/

/*************Cfg Page Manage Define************/
#define CfgPage96ManageDefault           {\
	CfgPermiOpt_Common                    ,\
	CfgOperaPermi_ReadOnly                ,\
	CfgPermiOpt_Common                    ,\
	CfgFunPermi_Operator                  ,\
	CfgOperaType_OSSem                    ,\
	AppSemOrd_PCFGPAGE96                  ,\
	CfgDataStru_NoLimit                   ,\
	(uint32_t)LXCfgBuffer_EventRecordP0   ,\
	CfgBFSize_EventRecordP0               ,\
}
PCFG_CALIB_EXT const CfgPageManage_TypeDef CfgPage96ManageUnit;


/*******************Cfg Buffer Define**************/
#define CfgBFSize_EventRecordP0                    4
#define CfgBFSize_PCFGPAGE96                       CfgBFSize_EventRecordP0
PCFG_CALIB_EXT uint16_t LXCfgBuffer_EventRecordP0[CfgBFSize_EventRecordP0];                  /* Special define */

/* Default */
#define CfgDefaultVal_EventRecordNumber            ((uint16_t)0)
#define CfgDefaultVal_EventRecordPoint             ((uint16_t)0)
#define CfgDefaultVal_GenRecordNumber              ((uint16_t)0)
#define CfgDefaultVal_GenRecordPoint               ((uint16_t)0)
#define CfgDefaultVal_EventRecordRegisters  {\
  CfgDefaultVal_EventRecordNumber           ,\
  CfgDefaultVal_EventRecordPoint            ,\
  CfgDefaultVal_GenRecordNumber             ,\
  CfgDefaultVal_GenRecordPoint              ,\
}

PCFG_CALIB_EXT const uint16_t LXCfgDefault_EventRecordRegisters[CfgBFSize_EventRecordP0];
#define EEPROMDefaultAdr_pcfgPage96 LXCfgDefault_EventRecordRegisters


#ifdef __cplusplus
}
#endif

#endif	/*	__PCFG_CALIB_H__	*/
